package rs.dalao.syc.user.chat.dao.persist.repository.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import rs.dalao.syc.user.chat.dao.persist.mapper.ChatMapper;
import rs.dalao.syc.user.chat.dao.persist.repository.IChatRepository;
import rs.dalao.syc.user.chat.pojo.vo.*;

import java.util.List;
import java.util.Map;

@Repository
public class ChatRepositroyImpl implements IChatRepository {
    @Autowired
    private ChatMapper mapper;

    @Override
    public List<ConsultDrVO> selectConsultDr(Integer depId) {
        List<ConsultDrVO> consultDrs = mapper.selectConsultDr(depId);
        return consultDrs;
    }

    @Override
    public List<OtherArticleVO> selectOtherArticle(Integer depId) {
        List<OtherArticleVO> otherArticles = mapper.selectOtherArticle(depId);
        return otherArticles;
    }

    @Override
    public List<DoctorVO> queryDoc(Map param) {
        return mapper.queryDoc(param);
    }

    @Override
    public List<QueryChatVO> queryChat(Map param) {
        return mapper.queryChat(param);
    }

    @Override
    public void insert(Map param) {
        mapper.insert(param);
    }

    @Override
    public List<UserVO> queryChatUser(Map param) {
        return mapper.queryChatUser(param);
    }

    @Override
    public List<DoctorDepVO> getDep(Long id) {
        return mapper.selectDepById(id);
    }

    @Override
    public List<DepartmentVO> getDepList(Integer type) {
        return mapper.getDepList(type);
    }

    @Override
    public List<AvatarVO> getAvatar(String userName) {
        return mapper.getAvatar(userName);
    }
}
